{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "import re\n",
    "import requests\n",
    "from subprocess import run\n",
    "from collections import defaultdict\n",
    "import runpy\n",
    "import tempfile"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = json.loads(requests.get('https://storage.googleapis.com/flutter_infra/releases/releases_linux.json').text)\n",
    "flutter_versions = data['releases']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [],
   "source": [
    "# replace these\n",
    "flutter_repo_path = '../co/sdk/flutter'\n",
    "engine_repo_path = '../co/sdk/engine'\n",
    "dart_repo_path = '../co/sdk/dart-sdk/full-clone'\n",
    "\n",
    "def make_cache(fn):\n",
    "    d = {}\n",
    "    def caching_fn(x):\n",
    "        if x not in d:\n",
    "            d[x] = fn(x)\n",
    "        return d[x]\n",
    "    return caching_fn\n",
    "\n",
    "def get_engine_version(flutter_commit):\n",
    "    p = run(['git', 'show', flutter_commit + ':bin/internal/engine.version'], check=True, capture_output=True, cwd=flutter_repo_path)\n",
    "    return p.stdout.decode().strip()\n",
    "\n",
    "def get_dart_version(engine_commit):\n",
    "    contents = run(['git', 'show', engine_commit + ':DEPS'], check=True, capture_output=True, cwd=engine_repo_path).stdout\n",
    "    m = re.search(r\"'dart_revision': '([a-fA-F0-9]+)'\", contents.decode())\n",
    "    return m.group(1)\n",
    "\n",
    "sv_template_file = tempfile.NamedTemporaryFile()\n",
    "sv_template_file.write('{{SNAPSHOT_HASH}}'.encode())\n",
    "sv_template_file.flush()\n",
    "sv_out_file = tempfile.NamedTemporaryFile()\n",
    "\n",
    "def get_snapshot_hash(dart_commit):\n",
    "    run(['git', 'checkout', dart_commit], check=True, cwd=dart_repo_path)\n",
    "    sv_out_file.seek(0)\n",
    "    run(['python2', 'tools/make_version.py', '--input=' + sv_template_file.name, '--output=' + sv_out_file.name], check=True, cwd=dart_repo_path)\n",
    "    return sv_out_file.read().decode()\n",
    "\n",
    "get_engine_version = make_cache(get_engine_version)\n",
    "get_dart_version = make_cache(get_dart_version)\n",
    "get_snapshot_hash = make_cache(get_snapshot_hash)\n",
    "\n",
    "#get_engine_version('master')\n",
    "#get_dart_version('11d756a62ed0ddf87a9ce20b219b55300ec6b67d')\n",
    "#get_snapshot_version('06536d68ca0f27528b0bf729f4b8d673ed14beda')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "| Release date | Channel | Version | Commit | Engine commit | Dart SDK commit | Snapshot version |\n",
      "| ------------ | ------- | ------- | ------ | ------------- | --------------- | ---------------- |\n",
      "| 2020-10-08 | stable | 1.22.1 | f30b7f4db93ee747cd727df747941a28ead25ff5 | 75bef9f6c8ac2ed4e1e04cdfcd88b177d9f1850d | efd753621946a89008b76b76d85d54d1aa57fce8 | 8ee4ef7a67df9845fba331734198a953 |\n",
      "| 2020-10-08 | beta | 1.22.0-12.4.pre | f30b7f4db93ee747cd727df747941a28ead25ff5 | 75bef9f6c8ac2ed4e1e04cdfcd88b177d9f1850d | efd753621946a89008b76b76d85d54d1aa57fce8 | 8ee4ef7a67df9845fba331734198a953 |\n",
      "| 2020-10-01 | stable | 1.22.0 | d408d302e22179d598f467e11da5dd968dbdc9ec | 5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec | 41eab9b49ccce8960f71c657861dc629f96295af | 8ee4ef7a67df9845fba331734198a953 |\n",
      "| 2020-09-29 | beta | 1.22.0-12.3.pre | d408d302e22179d598f467e11da5dd968dbdc9ec | 5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec | 41eab9b49ccce8960f71c657861dc629f96295af | 8ee4ef7a67df9845fba331734198a953 |\n",
      "| 2020-09-28 | beta | 1.22.0-12.2.pre | 2bafdc822636426fa09afb43236400a60ea432b2 | f763b5b9b936872bc6c84b4395286ce684e3b431 | 4215dca724fb80de592f51a6cdba51e7638d1723 | 8ee4ef7a67df9845fba331734198a953 |\n",
      "| 2020-09-16 | beta | 1.22.0-12.1.pre | 8b3760638a189741cd9ca881aa2dd237c1df1be5 | 4654fc6cf6416daae78eac2c211ad84c46e21625 | 52130c19ca593b185ea9cf72b26b1d02455551ef | 8ee4ef7a67df9845fba331734198a953 |\n",
      "| 2020-09-15 | stable | 1.20.4 | fba99f6cf9a14512e461e3122c8ddfaa25394e89 | d1bc06f032f9d6c148ea6b96b48261d6f545004f | b07da893600eadc4efafc5a54b8f9533e43c0034 | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-09-02 | stable | 1.20.3 | 216dee60c0cc9449f0b29bcf922974d612263e24 | d1bc06f032f9d6c148ea6b96b48261d6f545004f | b07da893600eadc4efafc5a54b8f9533e43c0034 | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-08-28 | beta | 1.21.0-9.2.pre | 81a45ec2e5f80fa71d5135f1702ce540558b416d | 20a953183580250aac2e15d36007664118bda5ab | 2ea332979fbc9e8c42f9efe4a33dec83108c897b | 5f40b0a9f04b5018fa08a9b67fd316cd |\n",
      "| 2020-08-19 | beta | 1.21.0-9.1.pre | be9bc8cb3942bda5d8ef4e44b44616c470625e18 | 267070c17a6956de1a03dbe09cda56f0c485f41b | 7cb472077b56a99aef7233bb616ba200b4de8682 | 5f40b0a9f04b5018fa08a9b67fd316cd |\n",
      "| 2020-08-14 | beta | 1.20.2 | bbfbf1770cca2da7c82e887e4e4af910034800b6 | 9d5b21729ff53dbf8eadd8bc97e0e30d77abec95 | e940ff7819053ed8a4c04a4dfcda7df12e969331 | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-08-13 | stable | 1.20.2 | bbfbf1770cca2da7c82e887e4e4af910034800b6 | 9d5b21729ff53dbf8eadd8bc97e0e30d77abec95 | e940ff7819053ed8a4c04a4dfcda7df12e969331 | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-08-06 | stable | 1.20.1 | 2ae34518b87dd891355ed6c6ea8cb68c4d52bb9d | c8e3b9485386425213e2973126d6f57e7ed83c54 | 6eb17654b6501e2617c67854ed113ab550d2b3c7 | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-08-05 | stable | 1.20.0 | 840c9205b344a59e48a5926ee2d791cc5640924c | c8e3b9485386425213e2973126d6f57e7ed83c54 | 6eb17654b6501e2617c67854ed113ab550d2b3c7 | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-08-03 | beta | 1.20.0-7.4.pre | 916c3ac648aa0498a70f32b5fc4f6c51447628e3 | d6ee1499c27a156a797d9f1539ffb7892855c1d0 | e2ea2e82e8785e18df30b7a06ef7cbc73fd9a81a | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-07-29 | beta | 1.20.0-7.3.pre | e606910f28be51c8151f6169072afe3b3a8b3c5e | ac95267aef5175b3f6c3387d502070c68f588ad5 | e2ea2e82e8785e18df30b7a06ef7cbc73fd9a81a | 04645b6182fad3d68350d84669869ce5 |\n",
      "| 2020-07-21 | beta | 1.20.0-7.2.pre | a2bde82fbd52e09057a4146f46889f4e10342d32 | 60b269d898cbe0be27e9b9ba9d21eae97b887ab6 | 57f76512bee70f7e96abf9306797a5e256e02453 | 8b2ca977d1d2920b9839d1b60eade6a7 |\n",
      "| 2020-07-01 | beta | 1.19.0-4.3.pre | 8fe7655ed20ffd1395f68e30539a847a01a30351 | 9a28c3bcf40ce64fee61e807ee3e1395fd6bd954 | 5815449a2935fd4a0a9505fa0f7ca562a53f2465 | 59da07d9da5a83be4ce75b7913b63dbd |\n",
      "| 2020-07-01 | beta | 1.19.0-4.2.pre | 9b9b543d9265484132c798adaab6caca52055b08 | 9a28c3bcf40ce64fee61e807ee3e1395fd6bd954 | 5815449a2935fd4a0a9505fa0f7ca562a53f2465 | 59da07d9da5a83be4ce75b7913b63dbd |\n",
      "| 2020-07-01 | stable | 1.17.5 | 8af6b2f038c1172e61d418869363a28dffec3cb4 | ee76268252c22f5c11e82a7b87423ca3982e51a7 | caebd6700d5ece73b5566b33ff1daecb91dac500 | be7d304ff826e2dfac63538e227c3cc5 |\n",
      "| 2020-06-18 | stable | 1.17.4 | 1ad9baa8b99a2897c20f9e6e54d3b9b359ade314 | ee76268252c22f5c11e82a7b87423ca3982e51a7 | caebd6700d5ece73b5566b33ff1daecb91dac500 | be7d304ff826e2dfac63538e227c3cc5 |\n",
      "| 2020-06-10 | beta | 1.19.0-4.1.pre | f994b769743368b36b9c03fb359f62230b60ab92 | 9a28c3bcf40ce64fee61e807ee3e1395fd6bd954 | 5815449a2935fd4a0a9505fa0f7ca562a53f2465 | 59da07d9da5a83be4ce75b7913b63dbd |\n",
      "| 2020-06-04 | stable | 1.17.3 | b041144f833e05cf463b8887fa12efdec9493488 | ee76268252c22f5c11e82a7b87423ca3982e51a7 | caebd6700d5ece73b5566b33ff1daecb91dac500 | be7d304ff826e2dfac63538e227c3cc5 |\n",
      "| 2020-05-28 | stable | 1.17.2 | 5f21edf8b66e31a39133177319414395cc5b5f48 | b851c718295a896918dc93cb1ff14f2f895a1b90 | 9a618e5661665b8d687a28e6b1ec25e9177ec2d7 | be7d304ff826e2dfac63538e227c3cc5 |\n",
      "| 2020-05-14 | beta | 1.18.0-11.1.pre | 2738a1148ba6c9a6114df62358109407c3ef2553 | ef9215ceb2884ddf520d321bcd822d1461330876 | 14c6a93013bfcd311dfeac1c0ad0a5f9f4afb5ef | b58ead73b2c5dfec69565df469bba387 |\n",
      "| 2020-05-13 | stable | 1.17.1 | f7a6a7906be96d2288f5d63a5a54c515a6e987fe | 6bc433c6b6b5b98dcf4cc11aff31cdee90849f32 | ae8b2249c8fb43ff894eb6f858c41520cf9ce5cc | 74edb834fac3fcea79d7ac2d1d6f1fb2 |\n",
      "| 2020-05-06 | stable | 1.17.0 | e6b34c2b5c96bb95325269a29a84e83ed8909b5f | 540786dd51f112885a89792d678296b95e6622e5 | f12284ca12b9076dcc86f1524fefd57a7318ee52 | 74edb834fac3fcea79d7ac2d1d6f1fb2 |\n",
      "| 2020-05-02 | beta | 1.17.0-3.4.pre | e6b34c2b5c96bb95325269a29a84e83ed8909b5f | 540786dd51f112885a89792d678296b95e6622e5 | f12284ca12b9076dcc86f1524fefd57a7318ee52 | 74edb834fac3fcea79d7ac2d1d6f1fb2 |\n",
      "| 2020-04-29 | beta | 1.17.0-3.3.pre | 0da1ab09224f6c6d69fcff1195a3662fe7ad7534 | 376ad6a64b08aa26005e3f82aed26de2e290b572 | 7611c1abb42779a7ef1117527a7b86677b130c03 | 74edb834fac3fcea79d7ac2d1d6f1fb2 |\n",
      "| 2020-04-22 | beta | 1.17.0-3.2.pre | 2a7bc389f28d83c581f7ddd4601588a22e12512e | 4c8c31f591882b3c668992d2e9da761118899f38 | 91f39d8eb15aad876332637eea090e196ad295ff | 74edb834fac3fcea79d7ac2d1d6f1fb2 |\n",
      "| 2020-04-17 | stable | v1.12.13+hotfix.9 | f139b11009aeb8ed2a3a3aa8b0066e482709dde3 | af51afceb8886cc11e25047523c4e0c7e1f5d408 | 1c9356d8990a2a8c90c66097e20cb2f22e5cc267 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2020-04-06 | beta | 1.17.0-dev.3.1 | d3ed9ec945f8869f0e136c357d0c2a6be2b60c98 | c9506cb8e93e5e8879152ff5c948b175abb5b997 | eea97179386a9ced7d68452cea158345f4019baa | 9e7cb7c9394c24c2398410b902673e13 |\n",
      "| 2020-03-17 | beta | v1.15.17 | 2294d75bfa8d067ba90230c0fc2268f3636d7584 | 5aff3119480996ca014ec0f8d26d74db617b5852 | 9983424a3c50c623730fd43b4ce263df660eb455 | ee91a9191a5286c31d91a89754ba36af |\n",
      "| 2020-02-11 | stable | v1.12.13+hotfix.8 | 0b8abb4724aa590dd0f429683339b1e045a1594d | e1e6ced81d029258d449bdec2ba3cddca9c2ca0c | 4cc36055d6803b899667feaedc1216a96e9d1c72 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2020-02-05 | beta | v1.14.6 | fabeb2a16f1d008ab8230f450c49141d35669798 | c4229bfbbae455ad69c967be19aee3fadd6486e1 | fc3af737c75931908521e9c36358a151408d6084 | e739779cc1d28f0f697a92f2daf5f10f |\n",
      "| 2020-01-27 | stable | v1.12.13+hotfix.7 | 9f5ff2306bb3e30b2b98eee79cd231b1336f41f4 | a67792536ca236a971d0efbcfd7af4efb8f6c119 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2020-01-15 | beta | v1.13.6 | 659dc8129d4edb9166e9a0d600439d135740933f | bdc9708d235e582483d299642ad8682826ebb90d | c547f5d933e5a10e18b1b26b54a6249e88fa0f1c | 81662522448cdd4d02eb060669e5d48b |\n",
      "| 2019-12-11 | beta | v1.12.13+hotfix.6 | 18cd7a3601bcffb36fdf2f679f763b5e827c2e8e | 2994f7e1e682039464cb25e31a78b86a3c59b695 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-12-11 | stable | v1.12.13+hotfix.5 | 27321ebbad34b0a3fafe99fac037102196d655ff | 2994f7e1e682039464cb25e31a78b86a3c59b695 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-12-11 | beta | v1.12.13+hotfix.5 | 27321ebbad34b0a3fafe99fac037102196d655ff | 2994f7e1e682039464cb25e31a78b86a3c59b695 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-12-10 | beta | v1.12.13+hotfix.4 | fb60324e6fa791bedeade8be4773a42037e11f62 | ac9391978e7c0693b75a82c219e059b6ffee35c4 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-12-06 | beta | v1.12.13+hotfix.3 | 57f2df76d75cff290cbe2765b07db1ad3e67b50d | ac9391978e7c0693b75a82c219e059b6ffee35c4 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-12-04 | beta | v1.12.13+hotfix.2 | 4f54e46f56c2ffc92eb440dbdab1a7f8e722e593 | 6955b06cedb2425f4363f10642c9b0e63e496af0 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-12-03 | beta | v1.12.13+hotfix.1 | 5b07015393539822da275ab9a348b9e9ce92a29e | c1e322b685a81c11c16bddd22282925b7d0272e8 | a4911c63f4f72ba571d6db94de56007b09f4af99 | 20e5c4f7dc44368ac5a17643b93665f6 |\n",
      "| 2019-11-22 | beta | v1.11.0 | 856a90e67c9284124d44d2be6c785bacd3a1c772 | af04338413c3ed73316350f64248a152433073b6 | fa4379946109467c8a48f20f19d83d7c72968a3e | 2fb364d659ea53f7892be9ba5e036047 |\n",
      "| 2019-10-23 | stable | v1.9.1+hotfix.6 | 68587a0916366e9512a78df22c44163d041dd5f3 | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-10-17 | stable | v1.9.1+hotfix.5 | 1aedbb1835bd6eb44550293d57d4d124f19901f0 | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-10-10 | beta | v1.10.7 | e70236e36ce1d32067dc68eb55519ec3e14b6b01 | 9e6314d348f9b5521e3c66856324d7a9c4a928c9 | 1103600280676ea169a30d7a503e836671cdc553 | c3bbfe8f226120ad0569d7b78ed2d9ef |\n",
      "| 2019-10-01 | stable | v1.9.1+hotfix.4 | cc949a8e8b9cf394b9290a8e80f87af3e207dce5 | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-09-27 | beta | v1.9.1+hotfix.4 | cc949a8e8b9cf394b9290a8e80f87af3e207dce5 | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-09-26 | beta | v1.9.1+hotfix.3 | a72edc27064c2cbfbbae17ea1695333e1b3d9595 | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-09-10 | stable | v1.9.1+hotfix.2 | 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-09-08 | beta | v1.9.1+hotfix.2 | 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f | b863200c37df4ed378042de11c4e9ff34e4e58c9 | 1ef83b86ae637ffe7359173804cbc6d3fa25e6db | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-09-04 | beta | v1.9.1+hotfix.1 | a1fb3fabec40144f57344635c37c28eed4fb122b | cc88fa45dbf4c55bc23cecea17fb90f43bccf588 | 74e4033d316abb6cc2290051ec85534caf4dca54 | c8562f0ee0ebc38ba217c7955956d1cb |\n",
      "| 2019-08-08 | beta | v1.8.3 | e4ebcdf6f4facee5779c38a04d91d08dc58ea7a4 | 38ac5f30a7026e870619c2e8e8c99c070d74036f | 0ca1582afdb057e8a701908c1c527e0a56a7b5b2 | 34948253b59d5a56b2ec161e17975a4e |\n",
      "| 2019-07-24 | stable | v1.7.8+hotfix.4 | 20e59316b8b8474554b38493b8ca888794b0234a | fee001c93f25a1e7258e762781a7361f122d29f5 | 7340a569caac6431d8698dc3788579b57ffcf0c6 | 1d7acad1540192ac459cf60344efb7c1 |\n",
      "| 2019-07-19 | beta | v1.7.8+hotfix.4 | 20e59316b8b8474554b38493b8ca888794b0234a | fee001c93f25a1e7258e762781a7361f122d29f5 | 7340a569caac6431d8698dc3788579b57ffcf0c6 | 1d7acad1540192ac459cf60344efb7c1 |\n",
      "| 2019-07-09 | stable | v1.7.8+hotfix.3 | b712a172f9694745f50505c93340883493b505e5 | 54ad777fd29b031b87c7a68a6637fb48c0932862 | 7340a569caac6431d8698dc3788579b57ffcf0c6 | 1d7acad1540192ac459cf60344efb7c1 |\n",
      "| 2019-07-09 | beta | v1.7.8+hotfix.3 | b712a172f9694745f50505c93340883493b505e5 | 54ad777fd29b031b87c7a68a6637fb48c0932862 | 7340a569caac6431d8698dc3788579b57ffcf0c6 | 1d7acad1540192ac459cf60344efb7c1 |\n",
      "| 2019-07-08 | stable | v1.7.8+hotfix.2 | 2e540931f73593e35627592ca4f9a4ca3035ed31 | b1cb0d9e9b44393efeb735f664672a74732cdc8b | 7340a569caac6431d8698dc3788579b57ffcf0c6 | 1d7acad1540192ac459cf60344efb7c1 |\n",
      "| 2019-07-02 | beta | v1.7.8+hotfix.2 | 2e540931f73593e35627592ca4f9a4ca3035ed31 | b1cb0d9e9b44393efeb735f664672a74732cdc8b | 7340a569caac6431d8698dc3788579b57ffcf0c6 | 1d7acad1540192ac459cf60344efb7c1 |\n",
      "| 2019-05-30 | beta | v1.6.3 | bc7bc940836f1f834699625426795fd6f07c18ec | 8dc3a4cde2075a4f5458fd0eb199627f5124508d | e3edfd36b2aa7ff4e98fe541ef5666ef2e70d17e | c89592e3e4956c33956c8ba0f691dbd0 |\n",
      "| 2019-05-07 | stable | v1.5.4-hotfix.2 | 7a4c33425ddd78c54aba07d86f3f9a4a0051769b | 52c7a1e849a170be4b2b2fe34142ca2c0a6fea1f | a1668566e563aef64025d0af88a099cbbe847b7e | eed485c757fba5d731e4054412c99f2e |\n",
      "| 2019-05-02 | beta | v1.5.4-hotfix.2 | 7a4c33425ddd78c54aba07d86f3f9a4a0051769b | 52c7a1e849a170be4b2b2fe34142ca2c0a6fea1f | a1668566e563aef64025d0af88a099cbbe847b7e | eed485c757fba5d731e4054412c99f2e |\n",
      "| 2019-04-30 | beta | v1.5.4-hotfix.1 | 09cbc34a0b19cef287a82aa4b9966d525369eecc | 52c7a1e849a170be4b2b2fe34142ca2c0a6fea1f | a1668566e563aef64025d0af88a099cbbe847b7e | eed485c757fba5d731e4054412c99f2e |\n",
      "| 2019-04-27 | beta | v1.5.4 | b593f5167bce84fb3cad5c258477bf3abc1b14eb | ca31a7c57bada458fa7f5c0d3f36bc1af4ccbc79 | cf4444b803a376bb1ad6442e1f09434a4d58167b | eed485c757fba5d731e4054412c99f2e |\n",
      "| 2019-04-12 | beta | v1.4.9-hotfix.1 | 88fa7ea4031f5c86225573e58e5558dc4ea1c251 | 4737fc5cd89b8f0136e927b00f2e159444b95a73 | f6768b6fb3e58bb704aca1e22a7ffd11e7ff07cb | f630ecdf457e27dd24d3b9e0a6bc1c13 |\n",
      "| 2019-03-15 | beta | v1.3.8 | e5b1ed7a7f7b85c1877e09a9495681f719be5578 | f4951df193a7966f9ed4da43d555eee0913d84d1 | 571ea80e1101e706980ea8aefa7fc18a0c8ba2ec | 9a66dcb2da955dffdbdb0eafa0288784 |\n",
      "| 2019-02-26 | stable | v1.2.1 | 8661d8aecd626f7f57ccbcb735553edc05a2e713 | 3757390fa4b00d2d261bfdf5182d2e87c9113ff9 | 0a7dcf17eb5f2450480527d6ad1e201fb47f1e36 | 0c73eb70aa4d30f450273cb424be8c62 |\n",
      "| 2019-02-26 | beta | v1.2.1 | 8661d8aecd626f7f57ccbcb735553edc05a2e713 | 3757390fa4b00d2d261bfdf5182d2e87c9113ff9 | 0a7dcf17eb5f2450480527d6ad1e201fb47f1e36 | 0c73eb70aa4d30f450273cb424be8c62 |\n",
      "| 2019-01-29 | beta | v1.1.8 | 985ccb6d14c6ce5ce74823a4d366df2438eac44f | 7112b72cc229e05d36716c3d7739885d3ffa72e6 | ec86471ccc47a62df8b4009e1fb37c66ff9dc91b | 317d4c7e607b1fd7d682c0010aadf1d0 |\n",
      "| 2018-12-04 | stable | v1.0.0 | 5391447fae6209bb21a89e6a5a6583cac1af9b4b | 7375a0f414bde4bc941e623482221db2fc8c4ab5 | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-12-04 | beta | v1.0.0 | 5391447fae6209bb21a89e6a5a6583cac1af9b4b | 7375a0f414bde4bc941e623482221db2fc8c4ab5 | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-30 | beta | v0.11.13 | 58c8489fcdb4e4ef6c010117584c9b23d15221aa | 7375a0f414bde4bc941e623482221db2fc8c4ab5 | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-29 | beta | v0.11.12 | 06ec8d3b41beb469d845626e36a246ee09300fa7 | 72c7a7567228cdaf8b7aa4a9e3d212ef9d4cc0ed | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-28 | beta | v0.11.11 | e7680128afbbde443d69f89bb264015276a8475a | be973ea196127383f356d39be466e2f3bd163083 | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-27 | beta | v0.11.10 | c27c4a265e9ad295e5d434cddabbc639b2e3542d | eebc6a58958587203f624528ff46b1d4b2b0f2fa | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-21 | beta | v0.11.9 | d48e6e433cc5ca67b24b19f70aaa197e84ba63c1 | 5c8147450db52b81232c138b9f9a65a8f9c61862 | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-20 | beta | v0.11.8 | f5b02e3c05ed1ab31e890add84fb56e35de2d392 | 1baf081343530dbaa8bec378fe1ce26b4897c23f | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-19 | beta | v0.11.7 | 7a005e1dcda665ace7241a24e79fae1a71f17b18 | 2e06da3df9cb370795f49747fdfd295b8168c133 | f9ebf2129732fd2b606286fdf58e500384b8a0bc | 8343f188ada07642f47c56e518f1307c |\n",
      "| 2018-11-13 | beta | v0.11.3 | 72bf075e8d6961d2ca6df462b2228954f8d0e73a | 5646e86a6f442dc6f4158ae7010ab13d72a0b356 | 9c07fb64c48adb3d6fde50bab6b8b641c5b67683 | d124ce50a30741a188e41c52c424c127 |\n",
      "| 2018-11-06 | beta | v0.10.2 | d8cbb80206db06d151206f8b599b7dde5a386a2d | 6c2ade9fa2b555899530a31cc8cbd1dff3bf5eea | bf26f760b1bb3d5fea6bda110f6a17b590364120 | 46b2bfb57b5647c5f7527ff9aa56c69b |\n",
      "| 2018-10-09 | beta | v0.9.4 | f37c235c32fc15babe6dc7b7bc2ee4387e5ecf92 | 74625aed323d04f2add0410e84038d250f51b616 | a2eb050044eec93f0844667b8b6132e858467e4e | a135b1a4c6790a272609c9405379bc63 |\n",
      "| 2018-09-18 | beta | v0.8.2 | 5ab9e70727d858def3a586db7fb98ee580352957 | 58a1894a1cd798de2f9a206f157a90d45944028b | 760a9690c22ec3f3d163173737f9949f97e6e02a | 1b444eb4796616ea2f955f3f1e440801 |\n",
      "| 2018-09-05 | beta | v0.7.3 | 3b309bda072a6b326e8aa4591a5836af600923ce | af42b6dc95bd9f719e43c4e9f29a00640f0f0bba | ccb16f72824374163562364bf19dd18e8a882fab | d0cf500478165d79bdefccb0847ffb33 |\n",
      "| 2018-08-28 | beta | v0.6.0 | 9299c02cf708497d6f72edda8efae0bb8340660e | e3687f70c7ece72000b32ee1b3c02755ba5361ac | be6309690fd60284a87f3258a740c7c30efb1092 | 35224090f45cbae1402bafd97a112a40 |\n",
      "| 2018-06-19 | beta | v0.5.1 | c7ea3ca377e909469c68f2ab878a5bc53d3cf66b | 1ed25ca7b7e3e3e8047df050bba4174074c9b336 | f981f097602ca434ce0a36b1f704723cad105fb6 | 04cb98b58e7d69109004454c20b492f7 |\n",
      "| 2018-05-22 | beta | v0.4.4 | f9bb4289e9fd861d70ae78bcc3a042ef1b35cc9d | 06afdfe54ebef9168a90ca00a6721c2d36e6aafa | 46ab040e589adc5200370dec7952ce5150850822 | 1b155eedbb3a2640a88d2e54d2f2d204 |\n",
      "| 2018-05-07 | beta | v0.3.2 | 44b7e7d3f42f050a79712daab253af06e9daf530 | 09d05a38912a3c1a906e95099cac9a7e14fae85f | fe606f890b0a311da802c78b0af414a3c2087a79 | 39646f79e9336fb65ac68c8568544c92 |\n",
      "| 2018-04-24 | beta | v0.3.1 | 12bbaba9ae044d0ea77da4dd5e4db15eed403f09 | 09d05a38912a3c1a906e95099cac9a7e14fae85f | fe606f890b0a311da802c78b0af414a3c2087a79 | 39646f79e9336fb65ac68c8568544c92 |\n",
      "| 2018-04-09 | beta | v0.2.8 | b397406561f5e7a9c94e28f58d9e49fca0dd58b7 | c903c217a1a8206cdebdab1703b52ec6180edf37 | 52afcba357ad398e8c24f3e3363ac6ff5293df63 | d72bf5003e5924b61a7943f58e7b6814 |\n",
      "| 2018-04-02 | beta | v0.2.3 | 5a58b36e36b8d7aace89d3950e6deb307956a6a0 | e61bb9ac3a3fd789754e2e54220bcfc27076a857 | 290c576264faa096a0b3206c71b2435309d9f904 | 0d015018f02a6de0c92ac1ac59191b55 |\n",
      "| 2018-03-15 | beta | v0.1.5 | 3ea4d06340a97a1e9d7cae97567c64e0569dcaa2 | ead227f118077d1f2b57842a32abaf105b573b8a | 0b4f01f7593c8c42a77dc27d1fc234c95eacc88e | 9bc066b6e8ef5a9f7224c2926c6ad2f4 |\n"
     ]
    }
   ],
   "source": [
    "print('| Release date | Channel | Version | Commit | Engine commit | Dart SDK commit | Snapshot version |')\n",
    "print('| ------------ | ------- | ------- | ------ | ------------- | --------------- | ---------------- |')\n",
    "for v in sorted(flutter_versions, key=lambda x: x['release_date'], reverse=True):\n",
    "    if v['channel'] not in { 'stable', 'beta' }: continue\n",
    "    engine_commit = get_engine_version(v['hash'])\n",
    "    dart_commit = get_dart_version(engine_commit)\n",
    "    snapshot_hash = get_snapshot_hash(dart_commit)\n",
    "    print(f\"| {v['release_date'][:10]} | {v['channel']} | {v['version']} | {v['hash']} | {engine_commit} | {dart_commit} | {snapshot_hash} |\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
